package org.common.mongo.collection;

import lombok.extern.slf4j.Slf4j;
import org.common.mongo.EntityType;
import org.common.mongo.MongoService;
import org.common.mongo.entity.BaseEntity;
import org.common.utils.SpringUtils;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.util.CollectionUtils;

import java.util.*;

/**
 * 角色详细数据
 */
@Slf4j
@Document
public class RoleCollection extends BaseCollection {

    @Id
    private long roleId;

    // 角色各个模块的数据数据
    private final Map<Integer, Map<Long, BaseEntity>> entity = new HashMap<>();

    @Override
    public Object getId() {
        return roleId;
    }

    public long getRoleId() {
        return roleId;
    }

    public void setRoleId(long roleId) {
        this.roleId = roleId;
    }

    public Map<Integer, Map<Long, BaseEntity>> getEntity() {
        return entity;
    }


}
